/**
 *   sci4j - Java library for scientific computation.
 *
 *   Copyright (C) 2010 Inaki Ortiz de Landaluce
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package org.sci4j.imaging.plugins.dicom;

public class DICOMImageMetaInformation {

	private int groupLength;
	private byte[] version = new byte[2];
	private String mediaStorageSOPClassUID;
	private String mediaStorageSOPInstanceUID;
	private String implClassUID;
	private String implVerName;
	private String srcAppEntityTitle;
	private String privateInformationCreatorUID;
	private String privateInformation;

	/**
	 * Set the number of bytes following this File Meta Element
	 * (end of value field) up to and including the last File Meta 
	 * Element of the Group 2 File Meta Information.
	 * @param value the File Meta Information Group Length in bytes
	 */
	public void setGroupLength(int value) {
		this.groupLength = value;
	}

	/**
	 * @return the File Meta Information Group byte length
	 */
	public int getGroupLength() {
		return this.groupLength;
	}

	/**
	 * Set the unique identifier for the implementation that wrote
	 * the file and its content.
	 * @param value the Implementation Class UID value
	 */
	public void setImplClassUID(String value) {
		this.implClassUID = value;
	}

	/**
	 * @return the Implementation Class UID
	 */
	public String getImplClassUID() {
		return implClassUID;
	}
	
	/**
	 * Set the Implementation Class UID version.
	 * @param value the Implementation Version Name value
	 */
	public void setImplVerName(String value) {
		this.implVerName = value;
	}

	/**
	 * @return the Implementation Version Name
	 */
	public String getImplVerName() {
		return implVerName;
	}
	

	/**
	 * Set the unique identifier for the SOP Class associated with 
	 * the Data Set.
	 * @param value the Media Storage SOP Class UID value
	 */
	public void setMediaStorageSOPClassUID(String value) {
		this.mediaStorageSOPClassUID = value;
	}

	/**
	 * @return the Media Storage SOP Class UID
	 */
	public String getMediaStorageSOPClassUID() {
		return mediaStorageSOPClassUID;
	}

	/**
	 * Set the unique identifier for the SOP Instance associated with 
	 * the Data Set.
	 * @param value the Media Storage SOP Instance UID value
	 */
	public void setMediaStorageSOPInstanceUID(String value) {
		this.mediaStorageSOPInstanceUID = value;
	}

	/**
	 * @return the Media Storage SOP Instance UID
	 */
	public String getMediaStorageSOPInstanceUID() {
		return mediaStorageSOPInstanceUID;
	}

	/**
	 * Set the Private Information placed in the File Meta 
	 * Information.
	 * @param value the Private Information value
	 */
	public void setPrivateInformation(String value) {
		this.privateInformation = value;
	}

	/**
	 * @return the Private Information
	 */
	public String getPrivateInformation() {
		return privateInformation;
	}

	/**
	 * Set the unique identifier for the creator of the Private
	 * Information.
	 * @param value the Private Information Creator UID value
	 */
	public void setPrivateInformationCreatorUID(String value) {
		this.privateInformationCreatorUID = value;
	}

	/**
	 * @return the Private Information Creator UID
	 */
	public String getPrivateInformationCreatorUID() {
		return privateInformationCreatorUID;
	}

	/**
	 * Set the DICOM Application Entity (AE) Title of the 
	 * AE that wrote the file's content (or last updated it).
	 * @param value the Source Application Entity Title value
	 */
	public void setSrcAppEntityTitle(String value) {
		this.srcAppEntityTitle = value;
	}

	/**
	 * @return the Source Application Entity Title
	 */
	public String getSrcAppEntityTitle() {
		return srcAppEntityTitle;
	}

	/**
	 * Set the two byte field where each bit identifies a version
	 * of the File Meta Information header.
	 * In version 1 the first byte value is 0x0 and the second value 
	 * is 0x1.  
	 * @param v1 version's first byte value
	 * @param v1 version's second byte value
	 */
	public void setVersion(byte v1, byte v2) {
		this.version[0] = v1;
		this.version[1] = v2;
	}

	/**
	 * @return the File Meta Information Version
	 */
	public byte[] getVersion() {
		return this.version;
	}
	
}
